home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
18
/
fpc103.zip
/
NEWFILE.SEQ
< prev
next >
Wrap
Text File
|
1988-06-30
|
867b
|
21 lines
\ NEWFILE.SEQ Create a new file, and edit it.
: newfile ( t1 --- )
bl word c@ 0=
if cr ." Filename to create? " query
bl word c@ 0= abort" No file specified"
then here
shndl @ dup >r hclose drop
r@ $>handle
r@ hopen
if r@ hcreate abort" Create file FAILED"
2573 \ decimal for CRLF
sp@ 2 r@ hwrite 2drop \ write an empty line
r@ hclose drop \ update the directory
r@ hopen drop \ for the new file
else >attrib1 ." File already exists! "
>norm 1 seconds
then r>drop
0 edit ;